<ul>
    <?php
        $cart = Yii::app()->cart;
        $mycart = $cart->contents();
		$total = $cart->total();
		if(count($mycart) == 0)
		{
			echo '<p class="t_c">购物车为空</p>';
		}
		else
		{
			//print_r($mycart);
			$last = array_pop($mycart);
			foreach( (array)$mycart as $m){
			// print_r($last);
			// echo '=============================';
			// print_r($mycart);
		?>
			<li class="c_f">
				<div class="pro_info f_l"><a href="javascript:" title=""><?php echo Tool::thumb($m['pic_url'],50,50,$m['title']),$m['title'];?></a></div>
				<div class="pro_price f_r t_r"><span class="price c_orange ff_yh d_b line_24">&yen;<?php echo $m['price'] ?>×<?php echo $m['qty'];?></span><a class="delete c_blue2" href="javascript:" onclick="deletesCart('<?php echo $m['rowid']?>')" title="删除">删除</a></div>
			</li>
		<?php 
			}
		?>
        <li class="c_f no_border">
            <div class="pro_info f_l"><a href="javascript:" title=""><?php echo Tool::thumb($last['pic_url'],50,50,$last['title']),$last['title'];?></a></div>
            <div class="pro_price f_r t_r"><span class="price c_orange ff_yh d_b line_24">&yen;<?php echo $last['price'] ?>×<?php echo $last['qty'];?></span><a class="delete c_blue2" href="javascript:" onclick="deletesCart('<?php echo $last['rowid']?>')" title="删除">删除</a></div>
        </li>
		<?php
		}
		?>
</ul>
<div class="total"><?php echo CHtml::link('去购物车结算', array('/cart/'), array('titlt' => '去购物车结算','class'=>'btn btn_go f_r'))?><span>共计：<strong class="fs_18 c_orange">&yen;<?php echo $total ?></strong></span></div>